package com.lurencun.android.topicbank.presist;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "exam_paper_topic_answer")
public class Answer {

	@DatabaseField(generatedId = true)
	private Long id;
	
	/** 问题ID **/
	private Long answerId;
	 
	@DatabaseField
	private String content;
	
	@DatabaseField
	private boolean correct;

	@DatabaseField(foreign = true, foreignAutoRefresh = true,columnName="topicId") 
	private Topic topic;
	
	private boolean checked;
	
	public Answer() {
	}
	
	public Long getAnswerId() {
		return answerId;
	}

	public void setAnswerId(Long answerId) {
		this.answerId = answerId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}


	public boolean isCorrect() {
		return correct;
	}

	public void setCorrect(boolean correct) {
		this.correct = correct;
	}

	public Topic getTopic() {
		return topic;
	} 

	public void setTopic(Topic topic) {
		this.topic = topic;
	}
	
	
	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}
	

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("id=").append(id);
		sb.append("answerId=").append(answerId);
		sb.append(" ,content=").append(content);
		sb.append(" ,correct=").append(correct);
		return sb.toString();
	}
}
